import React, {Component} from 'react';
import {HashRouter as Router, Switch, Route} from 'react-router-dom';

import Login from './pages/Login';
import Admin from './pages/Admin';

class App extends Component {
    render() {
        return (
            <Router>
                <Switch>
                    <Route path="/" exact component={Login}></Route>
                    <Route path="/login" component={Login}></Route>

                    {/*后台的首页*/}
                    <Route path="/admin" component={Admin}></Route>

                </Switch>

            </Router>
        );
    }
}

export default App;
